<?php

namespace app\api\controller;

use think\Controller;
use app\api\service\Token as TokenService;
use think\Request;

class BaseController extends Controller{

    const MSG_SUCCESS = '请求成功';
    const NOT_DATA = '暂无数据';
    const NOT_PARAM = '缺少参数';

    // 默认发布方
    protected $defaultPublisher = '江陵县住建局';


    protected function checkPrimaryScope(){
        TokenService::needPrimaryScope();

    }

    protected function checkExclusiveScope(){
        TokenService::needExclusiveScope();

    }

    public function getHttpParam()
    {
        $param = json_encode(Request::instance()->param());
        return json_decode($param);
    }
}